package common_classes;

import java.io.Serializable;

public final class AuctionStates implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -4020641742122224928L;
	
	public float highestBidPrice = 0; 		//current highest price of this auction
	public float secondHighestBidPrice = 0;	//current second highest price of this auction
	public float acceptableBidPrice = 0;	//current acceptable price of Dutch auction
	public float timeLeft = 0;				//time left before current bid is finished (in ms) 
	public String currentStatus = IAuction.AUCTION_IN_PROGRESS;
	public CustomerData highestBidCustomer;		//customer who placed the highest price on this bid
	
	public AuctionStates() {
		// TODO Auto-generated constructor stub
		this.highestBidPrice = 0;
		this.secondHighestBidPrice = 0;
		this.timeLeft = 0;
		this.acceptableBidPrice = 0;
		this.currentStatus = IAuction.AUCTION_IN_PROGRESS;
	}
	
	public AuctionStates(AuctionStates _clone) {
		if (_clone != null) {
			this.highestBidPrice = _clone.highestBidPrice;
			this.secondHighestBidPrice = _clone.secondHighestBidPrice;
			this.acceptableBidPrice = _clone.acceptableBidPrice;
			this.timeLeft = _clone.timeLeft;
			this.currentStatus = _clone.currentStatus;
			this.highestBidCustomer = _clone.highestBidCustomer;
		} else {
			this.highestBidPrice = 0;
			this.secondHighestBidPrice = 0;
			this.timeLeft = 0;
			this.acceptableBidPrice = 0;
			this.currentStatus = IAuction.AUCTION_IN_PROGRESS;
		}
	}
}
